home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HTBasic 9.3
/
HTBasic 9.3.iso
/
83win
/
data1.cab
/
Basic_Plus_Examples
/
PTRWDGT
< prev
next >
Wrap
Text File
|
2001-03-02
|
1KB
|
41 lines
10 ! *************************************************************
20 ! Example: PRINTER Widget
30 !
40 ! This program generates a PRINTER widget.
50 !
60 ! *************************************************************
70 !
80 DIM S$[50],P$[50],T$[50]
90 INTEGER Lines
100 !
110 ASSIGN @Prn TO WIDGET "PRINTER"
120 CONTROL @Prn;SET ("TITLE":" Example: PRINTER Widget")
130 CONTROL @Prn;SET ("X":50,"Y":25,"WIDTH":250,"HEIGHT":125)
140 CONTROL @Prn;SET ("SYSTEM MENU":"Quit")
150 !
160 ON EVENT @Prn,"SYSTEM MENU" GOTO Finis
170 !
180 S$=TIME$(TIMEDATE)&" PRINT TEST LINE 1"
190 CONTROL @Prn;SET ("APPEND TEXT":S$)
200 Lines=1
210 LOOP
220 REPEAT
230 P$=S$
240 S$=TIME$(TIMEDATE)
250 UNTIL S$<>P$
260 IF Lines<5 THEN
270 Lines=Lines+1
280 T$=S$&" PRINT TEST LINE "&VAL$(Lines)
290 CONTROL @Prn;SET ("CURRENT LINE":1,"INSERT TEXT":T$)
300 ELSE
310 CONTROL @Prn;SET ("CURRENT LINE":5)
320 STATUS @Prn;RETURN ("CURRENT TEXT":T$)
330 CONTROL @Prn;SET ("CURRENT LINE":5,"DELETE LINES":1)
340 CONTROL @Prn;SET ("CURRENT LINE":1,"INSERT TEXT":T$)
350 END IF
360 END LOOP
370 !
380 Finis:!
390 ASSIGN @Prn TO *! Delete PRINTER widget
400 END